//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        //1.BM3数组只出现一次的两个数字
        public int[] FindNumsAppearOnce (int[] nums) {
            Map<Integer,Integer> map = new HashMap<>();
            ArrayList<Integer> array = new ArrayList<>();
            for(int i = 0;i < nums.length;i++) {
                if(!map.containsKey(nums[i])) {
                    map.put(nums[i],1);
                } else {
                    map.put(nums[i],map.get(nums[i])+1);
                }
            }
            for(int i = 0;i < nums.length;i++) {
                if(map.get(nums[i]) == 1) {
                    array.add(nums[i]);
                }
            }
            if(array.get(0) < array.get(1)) {
                return new int[] {array.get(0),array.get(1)};
            } else {
                return new int[] {array.get(1),array.get(0)};
            }
        }

        //2.BM11二叉树的镜像
        public TreeNode Mirror (TreeNode pRoot) {
            if(pRoot == null) {
                return null;
            }
            TreeNode tmp = null;
            tmp = pRoot.left;
            pRoot.left = pRoot.right;
            pRoot.right = tmp;
            Mirror(pRoot.left);
            Mirror(pRoot.right);
            return pRoot;
        }
    }
}